package fun.formoji.alg.api;


import fun.formoji.alg.api.fallback.TrackingDataApiFallBackFactory;
import fun.formoji.alg.resp.UserEventVO;
import fun.formoji.commons.model.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <code>TrackingApi</code>
 * <desc>
 * 描述：
 * <desc/>
 * <b>Creation Time:</b> 2021/4/14 13:49.
 *
 * @author hshe
 */
@Component
@FeignClient(
        value = "alg-service",
        path = "/trackingData",
        contextId = "TrackingDataApi",
        fallbackFactory = TrackingDataApiFallBackFactory.class
)
public interface TrackingDataApi {
    @GetMapping(value = "/userEvent", produces = MediaType.APPLICATION_JSON_VALUE)
    RestResponse<UserEventVO> userEvent(@RequestParam String userId, @RequestParam String event);
}
